package com.xayy.mgt.model.vo;

import cn.kawins.spring.mvc.validator.Group;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * @author plq
 * 部件评估
 */
@Data
@Builder
public class ComponentAssessVo {

    @ApiModelProperty("权重")
    private List<Weight> weight;

    @ApiModelProperty("节点参数")
    private Map<String,Map<String,Object>> nodeParams;

    @ApiModelProperty("评估时间")
    @NotNull(groups = Group.Insert.class)
    private Date healthTime;

    @ApiModelProperty("卫星id")
    @NotNull(groups = Group.Insert.class)
    private Long satelliteId;

    @ApiModelProperty("分系统id")
    @NotNull(groups = Group.Insert.class)
    private Long systemId;

    @ApiModelProperty("节点id")
    @NotNull(groups = Group.Insert.class)
    private Long nodeId;


    @ApiModelProperty("采集数据")
    private Map<String,List<LinkedHashMap<String, Object>>> moduleList;


    @Data
    public static class Weight{
        @ApiModelProperty("名称")
        private String key;
        @ApiModelProperty("权重值")
        private Double value;

    }
}
